<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>FLITr: flitr::TMultiOSGConsumer&lt; T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">FLITr
   &#160;<span id="projectnumber">1.x</span>
   </div>
   <div id="projectbrief">Framework for Live Image Transformation.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classflitr_1_1_t_multi_o_s_g_consumer.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classflitr_1_1_t_multi_o_s_g_consumer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">flitr::TMultiOSGConsumer&lt; T &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="multi__osg__consumer_8h_source.html">multi_osg_consumer.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for flitr::TMultiOSGConsumer&lt; T &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="classflitr_1_1_t_multi_o_s_g_consumer__inherit__graph.png" border="0" usemap="#flitr_1_1_t_multi_o_s_g_consumer_3_01_t_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="flitr_1_1_t_multi_o_s_g_consumer_3_01_t_01_4_inherit__map" id="flitr_1_1_t_multi_o_s_g_consumer_3_01_t_01_4_inherit__map">
<area shape="rect" id="node2" href="classflitr_1_1_image_consumer.html" title="{flitr::ImageConsumer\n|&#45; SharedImageBuffer_\l&#45; ImageProducer_\l|+ ImageConsumer()\l+ ~ImageConsumer()\l+ getNumReadSlotsAvailable()\l+ getNumReadSlotsReserved()\l+ reserveReadSlot()\l+ releaseReadSlot()\l+ init()\l# setSharedImageBuffer()\l}" alt="" coords="5,5,211,229"/></map>
</div>
<div class="dynheader">
Collaboration diagram for flitr::TMultiOSGConsumer&lt; T &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="classflitr_1_1_t_multi_o_s_g_consumer__coll__graph.png" border="0" usemap="#flitr_1_1_t_multi_o_s_g_consumer_3_01_t_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="flitr_1_1_t_multi_o_s_g_consumer_3_01_t_01_4_coll__map" id="flitr_1_1_t_multi_o_s_g_consumer_3_01_t_01_4_coll__map">
<area shape="rect" id="node2" href="classflitr_1_1_image_consumer.html" title="{flitr::ImageConsumer\n||+ ImageConsumer()\l+ ~ImageConsumer()\l+ getNumReadSlotsAvailable()\l+ getNumReadSlotsReserved()\l+ reserveReadSlot()\l+ releaseReadSlot()\l+ init()\l# setSharedImageBuffer()\l}" alt="" coords="5,1003,211,1210"/><area shape="rect" id="node4" href="classflitr_1_1_image_producer.html" title="{flitr::ImageProducer\n|# ImageFormat_\l# SharedImageBuffer_\l# CreateMetadataFunction_\l|+ ImageProducer()\l+ ~ImageProducer()\l+ init()\l+ getFormat()\l+ getNumWriteSlotsAvailable()\l+ trigger()\l+ seek()\l+ getLeastNumReadSlotsAvailable()\l+ setCreateMetadataFunction()\l# releaseReadSlotCallback()\l# addConsumer()\l# reserveWriteSlot()\l# releaseWriteSlot()\l}" alt="" coords="40,5,275,333"/><area shape="rect" id="node6" href="classflitr_1_1_shared_image_buffer.html" title="Class for passing images between producers and consumers." alt="" coords="211,400,445,936"/></map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1782598170c252762aa43d0b6a343d77"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a1782598170c252762aa43d0b6a343d77">TMultiOSGConsumer</a> (<a class="el" href="classflitr_1_1_image_producer.html">ImageProducer</a> &amp;producer, uint32_t images_per_slot, uint32_t images_in_history=1)</td></tr>
<tr class="memitem:af161f41dfeb86757faddafb0631cc983"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#af161f41dfeb86757faddafb0631cc983">~TMultiOSGConsumer</a> ()</td></tr>
<tr class="memitem:a61f5f35814f7aa2667d04ad23722d685"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a61f5f35814f7aa2667d04ad23722d685">init</a> ()</td></tr>
<tr class="memitem:a8cb9b02b57dbe2cb505caba780aec9dd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a8cb9b02b57dbe2cb505caba780aec9dd">startDiscardThread</a> ()</td></tr>
<tr class="memitem:a6bd88334f6aef64d29c490a850481756"><td class="memItemLeft" align="right" valign="top">std::tr1::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="classflitr_1_1_image_metadata.html">ImageMetadata</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a6bd88334f6aef64d29c490a850481756">getImageMetadata</a> (uint32_t im_number=0, uint32_t im_age=0)</td></tr>
<tr class="memitem:a5ddea9b0ed05745d8dea58e46ee38d48"><td class="memItemLeft" align="right" valign="top">osg::Image *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a5ddea9b0ed05745d8dea58e46ee38d48">getOSGImage</a> (uint32_t im_number=0, uint32_t im_age=0)</td></tr>
<tr class="memitem:ac990d108782efcd0bb50cf36ef216e13"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#ac990d108782efcd0bb50cf36ef216e13">getOutputTexture</a> (uint32_t tex_number=0, uint32_t tex_age=0)</td></tr>
<tr class="memitem:a39c9d76c54b5a488d8c0e896880d41d9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a39c9d76c54b5a488d8c0e896880d41d9">getNext</a> ()</td></tr>
<tr class="inherit_header pub_methods_classflitr_1_1_image_consumer"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classflitr_1_1_image_consumer')"><img src="closed.png" alt="-"/>&nbsp;Public Member Functions inherited from <a class="el" href="classflitr_1_1_image_consumer.html">flitr::ImageConsumer</a></td></tr>
<tr class="memitem:a58f2c3e5758b892ebeff2188aab0a024 inherit pub_methods_classflitr_1_1_image_consumer"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_image_consumer.html#a58f2c3e5758b892ebeff2188aab0a024">ImageConsumer</a> (<a class="el" href="classflitr_1_1_image_producer.html">ImageProducer</a> &amp;producer)</td></tr>
<tr class="memitem:a3c4c0805b3365307b3083dcb346b2af4 inherit pub_methods_classflitr_1_1_image_consumer"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_image_consumer.html#a3c4c0805b3365307b3083dcb346b2af4">~ImageConsumer</a> ()</td></tr>
<tr class="memitem:aa8d2103df0dac8755b1a0fdc206932f7 inherit pub_methods_classflitr_1_1_image_consumer"><td class="memItemLeft" align="right" valign="top">virtual uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_image_consumer.html#aa8d2103df0dac8755b1a0fdc206932f7">getNumReadSlotsAvailable</a> ()</td></tr>
<tr class="memitem:a17c1abc98c01ef35c6cb0b7de7cc94ef inherit pub_methods_classflitr_1_1_image_consumer"><td class="memItemLeft" align="right" valign="top">virtual uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_image_consumer.html#a17c1abc98c01ef35c6cb0b7de7cc94ef">getNumReadSlotsReserved</a> ()</td></tr>
<tr class="memitem:a384a5dbebf79677f73a53688edda4d71 inherit pub_methods_classflitr_1_1_image_consumer"><td class="memItemLeft" align="right" valign="top">virtual std::vector&lt; <a class="el" href="classflitr_1_1_image.html">Image</a> ** &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_image_consumer.html#a384a5dbebf79677f73a53688edda4d71">reserveReadSlot</a> ()</td></tr>
<tr class="memitem:a7a84273411d105818dd6f1212cb78724 inherit pub_methods_classflitr_1_1_image_consumer"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_image_consumer.html#a7a84273411d105818dd6f1212cb78724">releaseReadSlot</a> ()</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:ac0eab94cd0dd8a72f97b20750425b471"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classflitr_1_1_image_format.html">ImageFormat</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#ac0eab94cd0dd8a72f97b20750425b471">ImageFormat_</a></td></tr>
<tr class="memdesc:ac0eab94cd0dd8a72f97b20750425b471"><td class="mdescLeft">&#160;</td><td class="mdescRight">A copy of the producer's formats.  <a href="#ac0eab94cd0dd8a72f97b20750425b471"></a><br/></td></tr>
<tr class="memitem:a38c8f69eac060cfab5791840c2a1500a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a38c8f69eac060cfab5791840c2a1500a">ImagesPerSlot_</a></td></tr>
<tr class="memdesc:a38c8f69eac060cfab5791840c2a1500a"><td class="mdescLeft">&#160;</td><td class="mdescRight">How many images per slot we expect.  <a href="#a38c8f69eac060cfab5791840c2a1500a"></a><br/></td></tr>
<tr class="memitem:a5432e08debd79288f506e10d60c60206"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a5432e08debd79288f506e10d60c60206">ImagesInHistory_</a></td></tr>
<tr class="memdesc:a5432e08debd79288f506e10d60c60206"><td class="mdescLeft">&#160;</td><td class="mdescRight">How many images/textures to keep in a read busy state.  <a href="#a5432e08debd79288f506e10d60c60206"></a><br/></td></tr>
<tr class="memitem:a1c3ff8400de58746f991d34b6adf6309"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a1c3ff8400de58746f991d34b6adf6309">HistoryWritePos_</a></td></tr>
<tr class="memdesc:a1c3ff8400de58746f991d34b6adf6309"><td class="mdescLeft">&#160;</td><td class="mdescRight">Where in the list of history images to update next.  <a href="#a1c3ff8400de58746f991d34b6adf6309"></a><br/></td></tr>
<tr class="memitem:a539a2245a5719c4bcab3bb116829b205"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::vector<br class="typebreak"/>
&lt; osg::ref_ptr&lt; osg::Image &gt; &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a539a2245a5719c4bcab3bb116829b205">OSGImages_</a></td></tr>
<tr class="memdesc:a539a2245a5719c4bcab3bb116829b205"><td class="mdescLeft">&#160;</td><td class="mdescRight">Buffer of OSG images that just wrap our producer's data.  <a href="#a539a2245a5719c4bcab3bb116829b205"></a><br/></td></tr>
<tr class="memitem:ae1865150f292e87ae04abb5b3e58f558"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::vector<br class="typebreak"/>
&lt; std::tr1::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="classflitr_1_1_image_metadata.html">flitr::ImageMetadata</a> &gt; &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#ae1865150f292e87ae04abb5b3e58f558">Metadata_</a></td></tr>
<tr class="memitem:a30c7a37b16b64cba984bc85dd20488ac"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::vector<br class="typebreak"/>
&lt; osg::ref_ptr&lt; T &gt; &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a30c7a37b16b64cba984bc85dd20488ac">OutputTextures_</a></td></tr>
<tr class="memdesc:a30c7a37b16b64cba984bc85dd20488ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Textures that can be used in OSG.  <a href="#a30c7a37b16b64cba984bc85dd20488ac"></a><br/></td></tr>
<tr class="memitem:afd2048494383a9aa7e2f9cc9b1e208ce"><td class="memItemLeft" align="right" valign="top">std::vector&lt; osg::ref_ptr<br class="typebreak"/>
&lt; osg::Image &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#afd2048494383a9aa7e2f9cc9b1e208ce">DummyImages_</a></td></tr>
<tr class="memdesc:afd2048494383a9aa7e2f9cc9b1e208ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Images to be used at initialisation for textures.  <a href="#afd2048494383a9aa7e2f9cc9b1e208ce"></a><br/></td></tr>
<tr class="memitem:aae953e7829aa4cb5070f41bf5ae63063"><td class="memItemLeft" align="right" valign="top">OpenThreads::Mutex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#aae953e7829aa4cb5070f41bf5ae63063">BufferMutex_</a></td></tr>
<tr class="memitem:ab188c03cc4d43ddab280648fc68199c5"><td class="memItemLeft" align="right" valign="top">std::tr1::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="classflitr_1_1_multi_o_s_g_consumer_discard_thread.html">MultiOSGConsumerDiscardThread</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#ab188c03cc4d43ddab280648fc68199c5">DiscardThread_</a></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a95b0b19c7ff8271c4e169b606437dd86"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a95b0b19c7ff8271c4e169b606437dd86">MultiOSGConsumerDiscardThread</a></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_classflitr_1_1_image_consumer"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classflitr_1_1_image_consumer')"><img src="closed.png" alt="-"/>&nbsp;Protected Member Functions inherited from <a class="el" href="classflitr_1_1_image_consumer.html">flitr::ImageConsumer</a></td></tr>
<tr class="memitem:a4f800e1ab9f514f6a642c4c91165e494 inherit pro_methods_classflitr_1_1_image_consumer"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflitr_1_1_image_consumer.html#a4f800e1ab9f514f6a642c4c91165e494">setSharedImageBuffer</a> (<a class="el" href="classflitr_1_1_shared_image_buffer.html">SharedImageBuffer</a> &amp;b)</td></tr>
<tr class="memdesc:a4f800e1ab9f514f6a642c4c91165e494 inherit pro_methods_classflitr_1_1_image_consumer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called once we get added as a consumer.  <a href="#a4f800e1ab9f514f6a642c4c91165e494"></a><br/></td></tr>
</table>
<a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;class T&gt;<br/>
class flitr::TMultiOSGConsumer&lt; T &gt;</h3>

<p>A consumer that takes images from a producer (possibly with many streams) and creates images and textures for consumption in OSG. </p>
</div><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1782598170c252762aa43d0b6a343d77"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">TMultiOSGConsumer::TMultiOSGConsumer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classflitr_1_1_image_producer.html">ImageProducer</a> &amp;&#160;</td>
          <td class="paramname"><em>producer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>images_per_slot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>images_in_history</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Creates an image consumer that passes data to OSG. Format is determined from the producer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">producer</td><td>The producer we must connect to. </td></tr>
    <tr><td class="paramname">images_per_slot</td><td>How many images we expect per slot. Can be less than what the producer provides. </td></tr>
    <tr><td class="paramname">images_in_history</td><td>How many images are kept in a read busy state so that they can be used in further processing. The producer must have more slots in its buffer than the history requested here. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classflitr_1_1_t_multi_o_s_g_consumer_a1782598170c252762aa43d0b6a343d77_cgraph.png" border="0" usemap="#classflitr_1_1_t_multi_o_s_g_consumer_a1782598170c252762aa43d0b6a343d77_cgraph" alt=""/></div>
<map name="classflitr_1_1_t_multi_o_s_g_consumer_a1782598170c252762aa43d0b6a343d77_cgraph" id="classflitr_1_1_t_multi_o_s_g_consumer_a1782598170c252762aa43d0b6a343d77_cgraph">
<area shape="rect" id="node3" href="classflitr_1_1_image_producer.html#a9495277a8122ec0f7cfb63dc83ceb955" title="flitr::ImageProducer\l::getFormat" alt="" coords="227,5,363,51"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="af161f41dfeb86757faddafb0631cc983"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">TMultiOSGConsumer::~TMultiOSGConsumer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2>Member Function Documentation</h2>
<a class="anchor" id="a6bd88334f6aef64d29c490a850481756"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::tr1::shared_ptr&lt; <a class="el" href="classflitr_1_1_image_metadata.html">ImageMetadata</a> &gt; TMultiOSGConsumer::getImageMetadata </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>im_number</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>im_age</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classflitr_1_1_t_multi_o_s_g_consumer_a6bd88334f6aef64d29c490a850481756_icgraph.png" border="0" usemap="#classflitr_1_1_t_multi_o_s_g_consumer_a6bd88334f6aef64d29c490a850481756_icgraph" alt=""/></div>
<map name="classflitr_1_1_t_multi_o_s_g_consumer_a6bd88334f6aef64d29c490a850481756_icgraph" id="classflitr_1_1_t_multi_o_s_g_consumer_a6bd88334f6aef64d29c490a850481756_icgraph">
<area shape="rect" id="node3" href="classflitr_1_1_multi_o_s_g_consumer_metadata_creator.html#a87cca04461bca86d50833352aeaba75e" title="flitr::MultiOSGConsumerMetadata\lCreator::getCurrentMetadata" alt="" coords="227,5,445,51"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a39c9d76c54b5a488d8c0e896880d41d9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool TMultiOSGConsumer::getNext </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Update all textures if new images are available from the producer. A single update is performed. E.g. a <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a39c9d76c54b5a488d8c0e896880d41d9">getNext()</a> should follow each update or trigger of the producer.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>make async version</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Whether a new image (or set from a slot) was obtained. </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classflitr_1_1_t_multi_o_s_g_consumer_a39c9d76c54b5a488d8c0e896880d41d9_cgraph.png" border="0" usemap="#classflitr_1_1_t_multi_o_s_g_consumer_a39c9d76c54b5a488d8c0e896880d41d9_cgraph" alt=""/></div>
<map name="classflitr_1_1_t_multi_o_s_g_consumer_a39c9d76c54b5a488d8c0e896880d41d9_cgraph" id="classflitr_1_1_t_multi_o_s_g_consumer_a39c9d76c54b5a488d8c0e896880d41d9_cgraph">
<area shape="rect" id="node3" href="classflitr_1_1_image.html#ad9877b0fc38df26cceac44cd3706416d" title="flitr::Image::metadata" alt="" coords="227,5,373,35"/><area shape="rect" id="node5" href="classflitr_1_1_image.html#a2bcec747b309a766a3d087f9351cba16" title="flitr::Image::data" alt="" coords="241,59,359,88"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a5ddea9b0ed05745d8dea58e46ee38d48"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">osg::Image * TMultiOSGConsumer::getOSGImage </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>im_number</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>im_age</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Gets access to an osg::Image in the buffer.</p>
<dl class="section note"><dt>Note</dt><dd>Images are reused to avoid uploading too much data, so the history parameter is valid only after the most recent <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a39c9d76c54b5a488d8c0e896880d41d9">getNext()</a> call.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">im_number</td><td>The specific source in the selected slot. </td></tr>
    <tr><td class="paramname">im_age</td><td>How far in history to select a slot. 0 is the latest.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to an osg::Image. </dd></dl>

</div>
</div>
<a class="anchor" id="ac990d108782efcd0bb50cf36ef216e13"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T * TMultiOSGConsumer::getOutputTexture </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>tex_number</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>tex_age</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Gets access to a texture that will contain updated images. The textures are automatically updated as new images are read. In other words, the texture with age 0 will always point to the latest image.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tex_number</td><td>The specific source or stream in the selected slot. </td></tr>
    <tr><td class="paramname">tex_age</td><td>How far in history to select a slot. 0 is the latest.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to an osg or osgCuda TextureRectangle. </dd></dl>

</div>
</div>
<a class="anchor" id="a61f5f35814f7aa2667d04ad23722d685"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool TMultiOSGConsumer::init </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The init method is used after construction to be able to return success or failure of initialisation.</p>
<dl class="section return"><dt>Returns</dt><dd>True if successful. </dd></dl>

<p>Reimplemented from <a class="el" href="classflitr_1_1_image_consumer.html#a9ad528933a705ab2bb44a388a2937f33">flitr::ImageConsumer</a>.</p>

</div>
</div>
<a class="anchor" id="a8cb9b02b57dbe2cb505caba780aec9dd"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void TMultiOSGConsumer::startDiscardThread </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Creates a background thread that discards images if <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a39c9d76c54b5a488d8c0e896880d41d9">getNext()</a> cannot be called fast enough. E.g. when OSG processing rate is lower than the producer rate.</p>
<dl class="section note"><dt>Note</dt><dd>The discard thread is possibly broken because it can release an image that is reserved for reading for display. In other words this could cause undesired chopping of frames! </dd></dl>

</div>
</div>
<h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a95b0b19c7ff8271c4e169b606437dd86"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classflitr_1_1_multi_o_s_g_consumer_discard_thread.html">MultiOSGConsumerDiscardThread</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2>Member Data Documentation</h2>
<a class="anchor" id="aae953e7829aa4cb5070f41bf5ae63063"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">OpenThreads::Mutex <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html">flitr::TMultiOSGConsumer</a>&lt; T &gt;::BufferMutex_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Synchronise access the shared buffer when we have a background thread (see next variable). </p>

</div>
</div>
<a class="anchor" id="ab188c03cc4d43ddab280648fc68199c5"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::tr1::shared_ptr&lt;<a class="el" href="classflitr_1_1_multi_o_s_g_consumer_discard_thread.html">MultiOSGConsumerDiscardThread</a>&gt; <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html">flitr::TMultiOSGConsumer</a>&lt; T &gt;::DiscardThread_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Background thread to discard images if <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html#a39c9d76c54b5a488d8c0e896880d41d9">getNext()</a> cannot be called fast enough. </p>

</div>
</div>
<a class="anchor" id="afd2048494383a9aa7e2f9cc9b1e208ce"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; osg::ref_ptr&lt;osg::Image&gt; &gt; <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html">flitr::TMultiOSGConsumer</a>&lt; T &gt;::DummyImages_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Images to be used at initialisation for textures. </p>

</div>
</div>
<a class="anchor" id="a1c3ff8400de58746f991d34b6adf6309"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html">flitr::TMultiOSGConsumer</a>&lt; T &gt;::HistoryWritePos_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Where in the list of history images to update next. </p>

</div>
</div>
<a class="anchor" id="ac0eab94cd0dd8a72f97b20750425b471"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classflitr_1_1_image_format.html">ImageFormat</a>&gt; <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html">flitr::TMultiOSGConsumer</a>&lt; T &gt;::ImageFormat_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>A copy of the producer's formats. </p>

</div>
</div>
<a class="anchor" id="a5432e08debd79288f506e10d60c60206"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html">flitr::TMultiOSGConsumer</a>&lt; T &gt;::ImagesInHistory_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>How many images/textures to keep in a read busy state. </p>

</div>
</div>
<a class="anchor" id="a38c8f69eac060cfab5791840c2a1500a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html">flitr::TMultiOSGConsumer</a>&lt; T &gt;::ImagesPerSlot_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>How many images per slot we expect. </p>

</div>
</div>
<a class="anchor" id="ae1865150f292e87ae04abb5b3e58f558"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; std::vector&lt; std::tr1::shared_ptr &lt;<a class="el" href="classflitr_1_1_image_metadata.html">flitr::ImageMetadata</a>&gt; &gt; &gt; <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html">flitr::TMultiOSGConsumer</a>&lt; T &gt;::Metadata_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a539a2245a5719c4bcab3bb116829b205"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; std::vector&lt; osg::ref_ptr &lt;osg::Image&gt; &gt; &gt; <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html">flitr::TMultiOSGConsumer</a>&lt; T &gt;::OSGImages_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Buffer of OSG images that just wrap our producer's data. </p>

</div>
</div>
<a class="anchor" id="a30c7a37b16b64cba984bc85dd20488ac"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; std::vector&lt; osg::ref_ptr &lt;T&gt; &gt; &gt; <a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html">flitr::TMultiOSGConsumer</a>&lt; T &gt;::OutputTextures_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Textures that can be used in OSG. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/flitr/<a class="el" href="multi__osg__consumer_8h_source.html">multi_osg_consumer.h</a></li>
<li>src/flitr/<a class="el" href="multi__osg__consumer_8cpp.html">multi_osg_consumer.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceflitr.html">flitr</a></li><li class="navelem"><a class="el" href="classflitr_1_1_t_multi_o_s_g_consumer.html">TMultiOSGConsumer</a></li>
    <li class="footer">Generated on Thu Dec 6 2012 09:15:45 for FLITr by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.2 </li>
  </ul>
</div>
</body>
</html>
